import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by code on 17-6-9.
 */
public class Withholding {

    /**失败*/
    public static final Integer FAILURE = 0;
    /**成功*/
    public static final Integer SUCCESS = 1;

    private static String[] statusName = {"支付失败","支付成功"};

    /**订单号*/
    private String merOrderId;
    /**姓名*/
    private String clientName;
    /**身份证号*/
    private String clientId;
    /**银行卡号*/
    private String cardNo;
    /**手机号*/
    private String mobile;
    /**代扣金额*/
    private String amount;
    /**代扣日期*/
    private Date payDate;
    /**代扣成功标识*/
    private Integer status;
    /**代扣结果*/
    private String result;

    public String getMerOrderId() {
        return merOrderId;
    }

    public void setMerOrderId(String merOrderId) {
        this.merOrderId = merOrderId;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public String getResult() {
        return result;
    }

    @Transient
    public String getStatusName(){
        return statusName[status];
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
